import debounce from "lodash/debounce";

export const setDomFontSize = () => {
  let width = document.documentElement.clientWidth || document.body.clientWidth;
  document.getElementsByTagName("html")[0].style["font-size"] = (width <= 1200 ? 1200 : width) / 100 + "px";
  console.log("resize...");
};
// 防抖
const setDomFontSizeDebounce = debounce(setDomFontSize, 500);
window.addEventListener("resize", setDomFontSizeDebounce);
